Dynomotion

Group: DynoMotion Message: 4584 From: Fouijar Date: 4/18/2012
Subject: Following error and motor tuning
Hi all,

I will make it short:

I tuned my X axis motor within Kmotion and have good results.
The following error is good and the bode parameters too (I think).

But, when I try to jog, move via G code inputs no matter what the tuning parameters within Mach3 are, the axis is disabeld: following error occurs!

If someone could give me a little help, it would be great!

Thanks,

Jerome
Group: DynoMotion Message: 4586 From: Tom Kerekes Date: 4/18/2012
Subject: Re: Following error and motor tuning
Hi Jerome,
 
There are several possibilities (you haven't described what you have done):
 
#1 Mach3 performs 2nd order motion (Jerk is infinite/full acceleration is applied instantly).  KMotion.exe tests 3rd order motion (motion is smoother and acceleration is ramped).  For below a certain size move KMotion.exe may never reach max acceleration.  To Test Mach3 type of moves in KMotion.exe set the Jerk to infinity (1000X the acceleration number).
 
#2 Did you create an Init.c program with the same parameters as in KMotion.exe screens? See:
 
 
 
#3 You have Mach3 configured to write to an IO bit that it shouldn't write to.  For example an output (Axis Enable or Spindle Relay Output) that writes to a pin used for Step/Dir generation or Encoder Input.   Something like this might inadvertently kill the motion or encoder feedback.
 
Regards
TK

Group: DynoMotion Message: 4589 From: Fouijar Date: 4/18/2012
Subject: Re: Following error and motor tuning
Hi Tom,

I did the config as explained and it's working very well for the Y and Z axis... so steps #2 and #3 are fine

I updated the parameters to exactly follow your #1 recommendations, it's not better.I uploaded in my folder some of the tests I did today (look for *1804.png files).
I better tuned to follow your advice regarding the jerk parameter, lowered the accel within mach3 to a very low value, nothing.
I mean the error persists.

I rechecked everything since my last sentence...15 min passed and it seems that it works now, I "loosened" some parameters and adjusted motors parameters within Mach3 to something more acceptable. But I can hear some "tacho growl" so I I'm probably near the limit.

Anyway, thanks for your help.

Regards,

Jerome

PS: Maybe should I start a thread to gather data when doing my tests?






--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Jerome,
>  
> There are several possibilities (you haven't described what you have done):
>  
> #1 Mach3 performs 2nd order motion (Jerk is infinite/full acceleration is applied instantly).  KMotion.exe tests 3rd order motion (motion is smoother and acceleration is ramped).  For below a certain size move KMotion.exe may never reach max acceleration.  To Test Mach3 type of moves in KMotion.exe set the Jerk to infinity (1000X the acceleration number).
>  
> #2 Did you create an Init.c program with the same parameters as in KMotion.exe screens? See:
>  
> http://www.dynomotion.com/Help/FlashHelp/Parameters/index.html
>  
> http://www.dynomotion.com/Help/Mach3Plugin/Mach3.htm
>  
> #3 You have Mach3 configured to write to an IO bit that it shouldn't write to.  For example an output (Axis Enable or Spindle Relay Output) that writes to a pin used for Step/Dir generation or Encoder Input.   Something like this might inadvertently kill the motion or encoder feedback.
>  
> Regards
> TK
>
> From: Fouijar <fouijar@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wednesday, April 18, 2012 7:03 AM
> Subject: [DynoMotion] Following error and motor tuning
>
>
>  
> Hi all,
>
> I will make it short:
>
> I tuned my X axis motor within Kmotion and have good results.
> The following error is good and the bode parameters too (I think).
>
> But, when I try to jog, move via G code inputs no matter what the tuning parameters within Mach3 are, the axis is disabeld: following error occurs!
>
> If someone could give me a little help, it would be great!
>
> Thanks,
>
> Jerome
>
Group: DynoMotion Message: 4593 From: Michael Rosenfield Date: 4/18/2012
Subject: Re: Following error and motor tuning
Jerome,
I'm using KMotionCNC with my mill, but I had the same issues you're having. I found that I had to cut the gain back quite a bit, adjust the tuning a bit,  and then the problems were solved.
Took me a while to get everything dialed in, and Tom has been most helpful - just takes patience!
 
Good luck!
 
Michael
 
Group: DynoMotion Message: 4598 From: Fouijar Date: 4/19/2012
Subject: Re: Following error and motor tuning
Hi,

I restarted to tune my setup and found that when I do larger moves, the following error occurs as before. But not when doing small moves.
This is more common to the situation of tests within mach3
I can avoid the error by reducing acceleration parameter, but it's not good it's way too slow.
I identified the process of following error formation when doing moves, here's the typical picture .
This process is always the same, I mean it's good since it's not erratic.
i.e. : If I do a move of 10000 counts accel can be 10x, when the move is about 100000 accel is 1x and 200000 0.5x relationship is relatively linear.

I tuned  by adding noise stimulation and adjusted my P and D parameters to have better gain and phase margin, so now I have more than 6 dB and 52° respectively.

Does  the scale on the right side represents the  velocity amplitude? ( if yes maybe max speed (2047) is reached, no?).
I also checked the amplifier, and the over current limit is done at 100% the overtorque 300%, maybe it's not possible to obtained accel torque due to current limitation.

If someone has an idea, he's welcome.

Thanks for your cooperation,

Jerome



--- In DynoMotion@yahoogroups.com, Michael Rosenfield <mrosenfield@...> wrote:
>
>
> Jerome,I'm using KMotionCNC with my mill, but I had the same issues you're having. I found that I had to cut the gain back quite a bit, adjust the tuning a bit, and then the problems were solved.Took me a while to get everything dialed in, and Tom has been most helpful - just takes patience! Good luck! Michael
> To: DynoMotion@yahoogroups.com
> From: fouijar@...
> Date: Wed, 18 Apr 2012 19:21:45 +0000
> Subject: [DynoMotion] Re: Following error and motor tuning
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Hi Tom,
>
>
>
> I did the config as explained and it's working very well for the Y and Z axis... so steps #2 and #3 are fine
>
>
>
> I updated the parameters to exactly follow your #1 recommendations, it's not better.I uploaded in my folder some of the tests I did today (look for *1804.png files).
>
> I better tuned to follow your advice regarding the jerk parameter, lowered the accel within mach3 to a very low value, nothing.
>
> I mean the error persists.
>
>
>
> I rechecked everything since my last sentence...15 min passed and it seems that it works now, I "loosened" some parameters and adjusted motors parameters within Mach3 to something more acceptable. But I can hear some "tacho growl" so I I'm probably near the limit.
>
>
>
> Anyway, thanks for your help.
>
>
>
> Regards,
>
>
>
> Jerome
>
>
>
> PS: Maybe should I start a thread to gather data when doing my tests?
>
>
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes tk@ wrote:
>
> >
>
> > Hi Jerome,
>
> > Â
>
> > There are several possibilities (you haven't described what you have done):
>
> > Â
>
> > #1 Mach3 performs 2nd order motion (Jerk is infinite/full acceleration is applied instantly). KMotion.exe tests 3rd order motion (motion is smoother and acceleration is ramped). For below a certain size move KMotion.exe may never reach max acceleration. To Test Mach3 type of moves in KMotion.exe set the Jerk to infinity (1000X the acceleration number).
>
> > Â
>
> > #2 Did you create an Init.c program with the same parameters as in KMotion.exe screens? See:
>
> > Â
>
> > http://www.dynomotion.com/Help/FlashHelp/Parameters/index.html
>
> > Â
>
> > http://www.dynomotion.com/Help/Mach3Plugin/Mach3.htm
>
> > Â
>
> > #3 You have Mach3 configured to write to an IO bit that it shouldn't write to. For example an output (Axis Enable or Spindle Relay Output) that writes to a pin used for Step/Dir generation or Encoder Input.  Something like this might inadvertently kill the motion or encoder feedback.
>
> > Â
>
> > Regards
>
> > TK
>
> >
>
> > From: Fouijar fouijar@
>
> > To: DynoMotion@yahoogroups.com
>
> > Sent: Wednesday, April 18, 2012 7:03 AM
>
> > Subject: [DynoMotion] Following error and motor tuning
>
> >
>
> >
>
> > Â
>
> > Hi all,
>
> >
>
> > I will make it short:
>
> >
>
> > I tuned my X axis motor within Kmotion and have good results.
>
> > The following error is good and the bode parameters too (I think).
>
> >
>
> > But, when I try to jog, move via G code inputs no matter what the tuning parameters within Mach3 are, the axis is disabeld: following error occurs!
>
> >
>
> > If someone could give me a little help, it would be great!
>
> >
>
> > Thanks,
>
> >
>
> > Jerome
>
> >
>
Group: DynoMotion Message: 4599 From: Tom Kerekes Date: 4/19/2012
Subject: Re: Following error and motor tuning
Hi Jerome,
 
I see you added a file (your link didn't work for me).
 
I assume you have analog amplifiers using Velocity mode?
 
From the Plot it is clear you are exceeding the max velocity of your amplifier.  The right axis on the plot is the DAC Output (green plot).  2047 counts represents max possible +10V to the amplifier.  You should set your Max Output value to 2047.  There is an issue/bug with Kanalog that if you try to command more that +10V the output wraps around to -10V and does bad things.  You can prevent this by setting the Max Output at 2047.  But that will not help your amplifier move the motor faster.  Your acceleration test also confirms this.  Longer moves will provide more time to get to a higher speed.  If you decrease the acceleration you may not then get to a high enough speed to cause a problem.  Once the trajectory moves at a faster speed than is possible with your motor/amplifier the following error rapidly grows and the axis is disabled.  The solution is to limit your max speed not your max acceleration.  I see you have your max velocity in KMotion set at 2.5e6 counts/sec which seems high although I don't know what your resolution is.  Or change some input gain setting on your Amplifier to allow +10V to command a higher speed. 
 
Your Bode plot looks great.
 
Regards
TK
 

Group: DynoMotion Message: 4600 From: Fouijar Date: 4/19/2012
Subject: Re: Following error and motor tuning
It seems that the link is wrong.

here's the right picture 

J.

--- In DynoMotion@yahoogroups.com, "Fouijar" <fouijar@...> wrote:
>
> Hi,
>
> I restarted to tune my setup and found that when I do larger moves, the
> following error occurs as before. But not when doing small moves.
> This is more common to the situation of tests within mach3
> I can avoid the error by reducing acceleration parameter, but it's not
> good it's way too slow.
> I identified the process of following error formation when doing moves,
> here's the typical picture
> <%20http://f1.grp.yahoofs.com/v1/0HyQT9TozmE_GdIiMQayx-THrc-aHefJqxwjoLZ\
> 61d2ZkRDkVm3LOh71nc69SvPKzZ-qx3y7rwRjAebWqcO0sDO2mCCPSw/Fouijar%20CNC%20\
> Files/Step%20resp%20and%20bode%201904.png> .
> This process is always the same, I mean it's good since it's not
> erratic.
> i.e. : If I do a move of 10000 counts accel can be 10x, when the move is
> about 100000 accel is 1x and 200000 0.5x relationship is relatively
> linear.
>
> I tuned by adding noise stimulation and adjusted my P and D parameters
> to have better gain and phase margin, so now I have more than 6 dB and
> 52° respectively.
>
> Does the scale on the right side represents the velocity amplitude? (
> if yes maybe max speed (2047) is reached, no?).
> I also checked the amplifier, and the over current limit is done at 100%
> the overtorque 300%, maybe it's not possible to obtained accel torque
> due to current limitation.
>
> If someone has an idea, he's welcome.
>
> Thanks for your cooperation,
>
> Jerome
>
>
>
> --- In DynoMotion@yahoogroups.com, Michael Rosenfield mrosenfield@
> wrote:
> >
> >
> > Jerome,I'm using KMotionCNC with my mill, but I had the same issues
> you're having. I found that I had to cut the gain back quite a bit,
> adjust the tuning a bit, and then the problems were solved.Took me a
> while to get everything dialed in, and Tom has been most helpful - just
> takes patience! Good luck! Michael
> > To: DynoMotion@yahoogroups.com
> > From: fouijar@
> > Date: Wed, 18 Apr 2012 19:21:45 +0000
> > Subject: [DynoMotion] Re: Following error and motor tuning
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Hi Tom,
> >
> >
> >
> > I did the config as explained and it's working very well for the Y and
> Z axis... so steps #2 and #3 are fine
> >
> >
> >
> > I updated the parameters to exactly follow your #1 recommendations,
> it's not better.I uploaded in my folder some of the tests I did today
> (look for *1804.png files).
> >
> > I better tuned to follow your advice regarding the jerk parameter,
> lowered the accel within mach3 to a very low value, nothing.
> >
> > I mean the error persists.
> >
> >
> >
> > I rechecked everything since my last sentence...15 min passed and it
> seems that it works now, I "loosened" some parameters and adjusted
> motors parameters within Mach3 to something more acceptable. But I can
> hear some "tacho growl" so I I'm probably near the limit.
> >
> >
> >
> > Anyway, thanks for your help.
> >
> >
> >
> > Regards,
> >
> >
> >
> > Jerome
> >
> >
> >
> > PS: Maybe should I start a thread to gather data when doing my tests?
> >
> >
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes tk@ wrote:
> >
> > >
> >
> > > Hi Jerome,
> >
> > > Â
> >
> > > There are several possibilities (you haven't described what you have
> done):
> >
> > > Â
> >
> > > #1 Mach3 performs 2nd order motion (Jerk is infinite/full
> acceleration is applied instantly). KMotion.exe tests 3rd order
> motion (motion is smoother and acceleration is ramped). For below a
> certain size move KMotion.exe may never reach max acceleration. To
> Test Mach3 type of moves in KMotion.exe set the Jerk to infinity (1000X
> the acceleration number).
> >
> > > Â
> >
> > > #2 Did you create an Init.c program with the same parameters as in
> KMotion.exe screens? See:
> >
> > > Â
> >
> > > http://www.dynomotion.com/Help/FlashHelp/Parameters/index.html
> >
> > > Â
> >
> > > http://www.dynomotion.com/Help/Mach3Plugin/Mach3.htm
> >
> > > Â
> >
> > > #3 You have Mach3 configured to write to an IO bit that it shouldn't
> write to. For example an output (Axis Enable or Spindle Relay
> Output) that writes to a pin used for Step/Dir generation or Encoder
> Input.  Something like this might inadvertently kill the motion
> or encoder feedback.
> >
> > > Â
> >
> > > Regards
> >
> > > TK
> >
> > >
> >
> > > From: Fouijar fouijar@
> >
> > > To: DynoMotion@yahoogroups.com
> >
> > > Sent: Wednesday, April 18, 2012 7:03 AM
> >
> > > Subject: [DynoMotion] Following error and motor tuning
> >
> > >
> >
> > >
> >
> > > Â
> >
> > > Hi all,
> >
> > >
> >
> > > I will make it short:
> >
> > >
> >
> > > I tuned my X axis motor within Kmotion and have good results.
> >
> > > The following error is good and the bode parameters too (I think).
> >
> > >
> >
> > > But, when I try to jog, move via G code inputs no matter what the
> tuning parameters within Mach3 are, the axis is disabeld: following
> error occurs!
> >
> > >
> >
> > > If someone could give me a little help, it would be great!
> >
> > >
> >
> > > Thanks,
> >
> > >
> >
> > > Jerome
> >
> > >
> >
>
Group: DynoMotion Message: 4601 From: Fouijar Date: 4/19/2012
Subject: Re: Following error and motor tuning
Hi Tom,

I noticed that when I was writing my message, looking a different way to the real picture ...
My max velocity is actually set to match 7500 mm/min at 10000 counts per 5mm (lead), so i have an error of 10 times the max speed...
(7500*10e+3)/(5*60)= 2.5e+5 not 2.5e+6, my mistake!
My drives are able to run at 3000 rpm=> 15 m/min.

I'll have a test tomorrow.

Thanks for your attention.

Good evening, (1:35 am here)

Jerome


--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Jerome,
>  
> I see you added a file (your link didn't work for me).
>  
> I assume you have analog amplifiers using Velocity mode?
>  
> From the Plot it is clear you are exceeding the max velocity of your amplifier.  The right axis on the plot is the DAC Output (green plot).  2047 counts represents max possible +10V to the amplifier.  You should set your Max Output value to 2047.  There is an issue/bug with Kanalog that if you try to command more that +10V the output wraps around to -10V and does bad things.  You can prevent this by setting the Max Output at 2047.  But that will not help your amplifier move the motor faster.  Your acceleration test also confirms this.  Longer moves will provide more time to get to a higher speed.  If you decrease the acceleration you may not then get to a high enough speed to cause a problem.  Once the trajectory moves at a faster speed than is possible with your motor/amplifier the following error rapidly grows and the axis is disabled.  The solution is to limit your max speed not your max acceleration.  I see you have your max velocity in
> KMotion set at 2.5e6 counts/sec which seems high although I don't know what your resolution is.  Or change some input gain setting on your Amplifier to allow +10V to command a higher speed. 
>  
> Your Bode plot looks great.
>  
> Regards
> TK
>  
>
> From: Fouijar <fouijar@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thursday, April 19, 2012 2:53 PM
> Subject: [DynoMotion] Re: Following error and motor tuning
>
>
>  
> Hi,
>
> I restarted to tune my setup and found that when I do larger moves, the following error occurs as before. But not when doing small moves.
> This is more common to the situation of tests within mach3
> I can avoid the error by reducing acceleration parameter, but it's not good it's way too slow.
> I identified the process of following error formation when doing moves, here's the typical picture .
> This process is always the same, I mean it's good since it's not erratic.
> i.e. : If I do a move of 10000 counts accel can be 10x, when the move is about 100000 accel is 1x and 200000 0.5x relationship is relatively linear.
>
> I tuned  by adding noise stimulation and adjusted my P and D parameters to have better gain and phase margin, so now I have more than 6 dB and 52° respectively.
>
> Does  the scale on the right side represents the  velocity amplitude? ( if yes maybe max speed (2047) is reached, no?).
> I also checked the amplifier, and the over current limit is done at 100% the overtorque 300%, maybe it's not possible to obtained accel torque due to current limitation.
>
> If someone has an idea, he's welcome.
>
> Thanks for your cooperation,
>
> Jerome
>
>
>
> --- In DynoMotion@yahoogroups.com, Michael Rosenfield <mrosenfield@> wrote:
> >
> >
> > Jerome,I'm using KMotionCNC with my mill, but I had the same issues you're having. I found that I had to cut the gain back quite a bit, adjust the tuning a bit, and then the problems were solved.Took me a while to get everything dialed in, and Tom has been most helpful - just takes patience! Good luck! Michael
> > To: DynoMotion@yahoogroups.com
> > From: fouijar@
> > Date: Wed, 18 Apr 2012 19:21:45 +0000
> > Subject: [DynoMotion] Re: Following error and motor tuning
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Hi Tom,
> >
> >
> >
> > I did the config as explained and it's working very well for the Y and Z axis... so steps #2 and #3 are fine
> >
> >
> >
> > I updated the parameters to exactly follow your #1 recommendations, it's not better.I uploaded in my folder some of the tests I did today (look for *1804.png files).
> >
> > I better tuned to follow your advice regarding the jerk parameter, lowered the accel within mach3 to a very low value, nothing.
> >
> > I mean the error persists.
> >
> >
> >
> > I rechecked everything since my last sentence...15 min passed and it seems that it works now, I "loosened" some parameters and adjusted motors parameters within Mach3 to something more acceptable. But I can hear some "tacho growl" so I I'm probably near the limit.
> >
> >
> >
> > Anyway, thanks for your help.
> >
> >
> >
> > Regards,
> >
> >
> >
> > Jerome
> >
> >
> >
> > PS: Maybe should I start a thread to gather data when doing my tests?
> >
> >
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes tk@ wrote:
> >
> > >
> >
> > > Hi Jerome,
> >
> > > Â
> >
> > > There are several possibilities (you haven't described what you have done):
> >
> > > Â
> >
> > > #1 Mach3 performs 2nd order motion (Jerk is infinite/full acceleration is applied instantly). KMotion.exe tests 3rd order motion (motion is smoother and acceleration is ramped). For below a certain size move KMotion.exe may never reach max acceleration. To Test Mach3 type of moves in KMotion.exe set the Jerk to infinity (1000X the acceleration number).
> >
> > > Â
> >
> > > #2 Did you create an Init.c program with the same parameters as in KMotion.exe screens? See:
> >
> > > Â
> >
> > > http://www.dynomotion.com/Help/FlashHelp/Parameters/index.html
> >
> > > Â
> >
> > > http://www.dynomotion.com/Help/Mach3Plugin/Mach3.htm
> >
> > > Â
> >
> > > #3 You have Mach3 configured to write to an IO bit that it shouldn't write to. For example an output (Axis Enable or Spindle Relay Output) that writes to a pin used for Step/Dir generation or Encoder Input.  Something like this might inadvertently kill the motion or encoder feedback.
> >
> > > Â
> >
> > > Regards
> >
> > > TK
> >
> > >
> >
> > > From: Fouijar fouijar@
> >
> > > To: DynoMotion@yahoogroups.com
> >
> > > Sent: Wednesday, April 18, 2012 7:03 AM
> >
> > > Subject: [DynoMotion] Following error and motor tuning
> >
> > >
> >
> > >
> >
> > > Â
> >
> > > Hi all,
> >
> > >
> >
> > > I will make it short:
> >
> > >
> >
> > > I tuned my X axis motor within Kmotion and have good results.
> >
> > > The following error is good and the bode parameters too (I think).
> >
> > >
> >
> > > But, when I try to jog, move via G code inputs no matter what the tuning parameters within Mach3 are, the axis is disabeld: following error occurs!
> >
> > >
> >
> > > If someone could give me a little help, it would be great!
> >
> > >
> >
> > > Thanks,
> >
> > >
> >
> > > Jerome
> >
> > >
> >
>